<?php /* @var $partner Partner */ ?>
<div class="title">
    <?php echo __('partners') ?>
</div>

<?php $city_id = ''?>

<table class="partners" cellpadding="4" cellspacing="1">
    <?php $i = 1; foreach($partners as $partner ): $odd = fmod(++$i, 2) ?>
        <?php if($city_id == $partner->getGeoNameId()): ?>
            <?php $city_view = ''; ?>
		<?php else: ?>
			<?php $city_view = $partner->getGeoName(); ?>
        <?php endif; ?>
		
    <tr class="sf_admin_row_<?php echo $odd ?>">
        <td width="120" align="left" valign="top">
            <?php if( $partner->getFilePath() ): ?>
                <?php echo link_to(
                                    image_tag(
                                        '/uploads/partners/' . $partner->getFilePath()
                                        , array(
                                            'border' => '0'
                                            , 'alt' => $partner->getName()
                                            , 'title' => $partner->getName()
                                        )
                                    )
                                    , $partner->getLinkTo()
                                ); ?>
            <?php endif; ?>
        </td>
        <td width="60%" align="left" valign="top">
            <?php if( $partner->getLinkTo() ): ?>
                <?php echo link_to(
                                $partner->getName()
                                , $partner->getLinkTo()
                                , array(
                                    'class' => 'registration'
                                )
                            ); ?>
            <?php else: ?>
                <?php echo $partner->getName() ?>
            <?php endif; ?>
        </td>
        <td width="30%" align="left" valign="top"><?php echo $city_view ?></td>
    </tr>

		<?php $city_id = $partner->getGeoNameId()?>
    <?php endforeach; ?>
</table>
